package zzti.com.View;

import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.widget.GridView;
import java.util.List;
import zzti.com.Interface.onclick;
import zzti.com.Modle.FunctionModle;
import zzti.com.Presenter.FunctionAdapter;
import zzti.com.Presenter.onitemclick;
import zzti.com.hongbao.R;

public class MainActivity extends BaseActivity implements onclick {
    private GridView gridview;
    private List<String> list;
    private FunctionModle functiondata;
    private Dialog TipsDialog;
    @Override
   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        functiondata = new FunctionModle();
        list = functiondata.getData();
        InitView();
        InitListener();

    }

    public void InitView() {
        gridview = (GridView) findViewById(R.id.gridview);
    }

    public void InitListener() {

        gridview.setAdapter(new FunctionAdapter(this, list));
        gridview.setOnItemClickListener(new onitemclick(MainActivity.this));

    }

    @Override
    public void setuponclick() {

    }
    @Override
    public void setNotification() {
        Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
        startActivity(intent);
    }
    @Override
    public void setWeiXin() {
        Intent intent=new Intent(MainActivity.this,MainActivityWexin.class);
        startActivity(intent);
    }
    @Override
    protected void onResume() {
        super.onResume();


    }



}
